<!doctype html>
<html>
    <head>
        <Title>Ominian</title>
        <!-- TODO figure out if Orbited is smart enough eTag this, alt. should be able to move to the CDN -->
        <script src="/static/Orbited.js"></script>
        <script>            
            TCPSocket = Orbited.TCPSocket;
        </script>        
        <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js"></script>        
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
        <script>  jQuery.noConflict(); </script>
        <script src="/WM/extjs/adapter/prototype/ext-prototype-adapter.js"></script>
        <script src="/WM/extjs/ext-all.js"></script>
        <script src="/WM/signal.js" ></script>  <!-- don't trust Orbited to get the MIME type right -->
        
        <link href="/WM/extjs/resources/css/ext-all.css" type="text/css"  rel="stylesheet" />
    </head>
    <body>        
        <script>
            
        Ext.onReady(function(){            
            nsr = new wm.NetStringReceiver();
            nsr.stringReceived = function(msg){
                Ext.Msg.alert("Message Received", msg);
            }
            
            testString1 = "Hell world, This is a test!";            
            message1 = testString1.length + ":" + testString1;
            for(var i = 0; i < message1.length; i++){
                console.log("Incrementing to " + i);
                nsr.dataReceived(message1.charAt(i));
            }            
        });
    </script>
</html>